<template>
	<div>
		<el-button type="primary" @click="testGetSysLogInfo()" >测试日志接口</el-button>
		<el-button type="primary" @click="getProcessDefinitionList()" >测试流程模板查询</el-button>
	</div>
</template>
<script setup lang="ts" name="apiTest">
import { ElMessage } from 'element-plus'
import { exampleApi } from '/@/api/sys/example-api'

const testGetSysLogInfo = () => {
	exampleApi.getSysLogInfo().then(data => {
		if (data && data.code === 0) {
			ElMessage.success('调用成功')
		} else {
			ElMessage.error(data.message)
		}
	}).catch(() => {
		ElMessage.error("调用失败")
	})
}

const getProcessDefinitionList = () => {
	exampleApi.getProcessDefinitionList().then(data => {
		if (data && data.code === 0) {
			ElMessage.success('调用成功')
			console.log(data.data)
		} else {
			ElMessage.error(data.message)
		}
	}).catch(() => {
		ElMessage.error("调用失败")
	})
}
</script>